from urllib.request import urlopen
from bs4 import BeautifulSoup

html = urlopen('https://www.douban.com/gallery/')
bsObj = BeautifulSoup(html, 'html.parser')

# nameList = bsObj.findAll('span', {'class': 'topic_name'})
# for x in nameList:
#     print(x.get_text())

# nameList = bsObj.findAll('', {'id': 'icp'})
# for x in nameList:
#     print(x.get_text())

nameList = bsObj.findAll(text = "电影")
print(len(nameList))
